package com.example.card.transactionimplementation;

import com.example.card.implemention.ExpireDate;
import com.example.card.abstracttransactions.AddCardTransaction;
import com.example.card.domain.card.CardClassification;
import com.example.card.domain.card.ExpireDataLimit;

import java.time.LocalDate;

import static com.example.card.CardConstant.*;

public class AddInstallmentCardTransaction extends AddCardTransaction {


    public AddInstallmentCardTransaction(int id, int balance) {
        super(id, balance);
    }

    @Override
    public int getCardFunction() {
        return 0  ;
    }

    @Override
    public int getCardOilLabel() {
        return OIL_LABEL_ALL;
    }

    @Override
    public String getCardName() {
        return "分期卡";
    }

    @Override
    public String getCardNoPrefix() {
        return "6004";
    }

    @Override
    public Integer getType() {
        return CARD_INSTALLMENT;
    }

    @Override
    public CardClassification getCardClassification() {
        return null;
    }



    @Override
    public ExpireDataLimit getExpireDataLimit() {
        LocalDate now = LocalDate.now();
        return new ExpireDate(now, now.plusYears(1));
    }
}
